<template>
    <div class="app-container">
        <el-row>
            <el-button type="danger" round @click="$router.go(-1)">返回</el-button>
        </el-row>
        <el-table ref="dataList" :data="menuList" style="margin-bottom: 20px;" row-key="id" border :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
            <el-table-column prop="add_time" label="下单时间" > </el-table-column>
            <el-table-column prop="user_code" label="下单人编号" > </el-table-column>
            <el-table-column prop="user_name" label="下单人昵称" > </el-table-column>
            <el-table-column prop="u_code" label="大神编号" > </el-table-column>
            <el-table-column prop="u_name" label="大神昵称" > </el-table-column>
            <el-table-column prop="status" label="订单状态" >
                <template slot-scope="scope">
                    <p>{{scope.row.status === 1?'待接单':''}}</p>
                    <p style="color:#f0d695">{{scope.row.status === 2?'已取消':''}}</p>
                    <p style="color:#F56C6C">{{scope.row.status === 3?'已拒绝':''}}</p>
                    <p>{{scope.row.status === 4?'服务中':''}}</p>
                    <p>{{scope.row.status === 5?'服务完成':''}}</p>
                    <p style="color:#67C23A">{{scope.row.status === 6?'已结算':''}}</p>
                    <p>{{scope.row.status === 7?'申诉中':''}}</p>
                    <p>{{scope.row.status === 8?'申请退款中':''}}</p>
                    <p style="color:#409EFF">{{scope.row.status === 9?'成功退款':''}}</p>
                    <p>{{scope.row.status === 10?'拒绝退款':''}}</p>
                    <p></p>
                </template>
            </el-table-column>
            <el-table-column prop="order_num" label="订单量" > </el-table-column>
        </el-table>
        <!-- 分页 -->
        <!-- <cus-pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.perPage" @pagination="getList"/> -->
    </div>
</template>

<script>
import {
    listData
} from '@/api/sendOrders/sendOrdersDetail'

export default {
    data(){
        return {
            listLoading:true,
            menuList:[],
            total:100,
        }
    },
    created(){
        this.getList()
    },
    methods: {
        getList(){
            this.listLoading = true
            let urlData = "?"
            for(let key in this.$route.query){
                urlData += `&${key}=${this.$route.query[key]}`
            }
            // urlData)
            listData(urlData).then(response => {
                // response)
                this.menuList = response.data;
                this.listLoading = false;
            })
        }
    }
}
</script>

<style scoped>
    .el-row {
        margin-bottom: 20px;
    }

    .el-row .el-button {
        float: right;
    }
</style>
